After collecting large datasets, descriptive statistics are used to summarize central tendency and dispersion.
Central Tendency
Measures of central tendency include:
Arithmetic Mean: Sum of values divided by count.
Median: 0.5 quantile (middle value).
Mode: Most frequent value.
Geometric Mean: nth root of the product of n values.
Harmonic Mean: Reciprocal of the arithmetic mean of reciprocals.
Trimmed Mean: Arithmetic mean after removing a percentage of extreme values.
【Excel】
Example file: Samples\ch21\Excel Functions\Descriptive Statistics - Central Tendency.xlsx.
Mean: =AVERAGE(A2:A85) → 143.7738
Median: =MEDIAN(A2:A85) → 143.5
Mode: =MODE(A2:A85) → 142
Geometric Mean: =GEOMEAN(A2:A85) → 143.6506
Harmonic Mean: =HARMEAN(A2:A85) → 143.5264
Trimmed Mean: =TRIMMEAN(A2:A85) → 143.8
【Python pandas】
Use mean() (mean), median() (median), and mode() (mode) for Series objects.
Dispersion
Measures of dispersion include:
Range: Max - Min.
Variance: Average of squared differences from the Mean.
Mean Absolute Deviation (MAD): Average of absolute differences from the Mean.
Standard Deviation: Square root of variance.
Interquartile Range (IQR): 0.75 quantile - 0.25 quantile.
【Excel】
Example file: Samples\ch21\Excel Functions\Descriptive Statistics - Dispersion.xlsx.
Range: =MAX(A2:A85)-MIN(A2:A85) → 32
Variance: =VAR(A2:A85) → 35.64702
MAD: =AVEDEV(A2:A85) → 4.630952
Std: =STDEV(A2:A85) → 5.970512
IQR: =PERCENTILE.EXC(A2:A85,0.75)-PERCENTILE.EXC(A2:A85,0.25) → 8
【Python pandas】
Use max(), min() (range), var() (variance), std() (std), mad() (MAD), and quantile() (quantiles).